#include "BaseDataManager.h"
#include <atomic>

class PelcoDReader : public BaseDataManager
{
public:
    PelcoDReader();
    ~PelcoDReader();

    virtual void ParseMsg(const std::string &msg);
    virtual bool ProcessMsg(std::string &msg);

    double GetP();
    double GetT();
    double GetZV();
    double GetZN();

private:
    bool IsCrcCorrect(const std::string &msg);
    unsigned short make_short(unsigned char high, unsigned char low);

private:
    std::atomic_int p_;
    std::atomic_int t_;
    std::atomic_int z_visible;
    std::atomic_int z_night;
};